Xbasic

*when Function

Syntax

A result = *WHEN(watch as a,cacheResult as a)

Arguments

result

Result of expression. Any type

watch

An expression that controls when cacheResult gets evaluated. Whenever the watchExpression changes, the cacheResult expression is re-evaluated. Any type

cacheResult

The complex expression to evaluate and cache. Any type

Description

For use in Form layouts to control when a calculated field gets recalculated. WHEN caches results for expensive functions - only updates when value of first argument changes - example - *WHEN(state,total(budget,grp->state_data)) , will recalculate the total only when 'state' changes.

Limitations

Desktop Applications Only

See Also